package map.action;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import map.mapeditor.MapEditor;

public abstract class AbstractFileAction extends AbstractAction{
	protected MapEditor mapeditor;
	private SaveAsAction saveasaction;
	protected AbstractFileAction(MapEditor mapeditor, SaveAction saveaction,String name,String title){
		super(name);
		this.mapeditor=mapeditor;
		saveasaction=saveaction;
		putValue(SHORT_DESCRIPTION, title);
	}

	@Override
	public void actionPerformed(ActionEvent paramActionEvent) {
		// TODO Auto-generated method stub
		doPerformAction();
	}
	
	 /**
     * Actually performs the action, in the confidence that any existing map
     * has been either saved or discarded.
     */
    protected abstract void doPerformAction();
	
}
